- add_to_breadcrumbs @hook.pluralized_name, group_hooks_path(@group)
- page_title _('Edit Group Hook')

= render 'shared/web_hooks/hook_errors', hook: @hook

.row.gl-mt-3
  .col-lg-3
    = render 'shared/web_hooks/title_and_docs', hook: @hook

  .col-lg-9.gl-mb-3
    = gitlab_ui_form_for [@group, @hook], as: :hook, url: group_hook_path(@group, @hook), html: { class: 'js-webhook-form' } do |f|
      = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook }

      %span>= f.submit _('Save changes'), pajamas_button: true, class: 'gl-mr-3'
      = render 'shared/web_hooks/test_button', hook: @hook
      = link_to _('Delete'), group_hook_path(@group, @hook), method: :delete, class: 'gl-button btn btn-danger float-right', aria: { label: s_('Webhooks|Delete webhook') }, data: { confirm: s_('Webhooks|Are you sure you want to delete this group hook?'), confirm_btn_variant: 'danger' }

%hr

= render partial: 'shared/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs, group: @group }
